/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ecom.beans.account;

import java.util.List;
import javax.ejb.Remote;

/**
 *
 * @author Tian
 */
@Remote
public interface AccountEntityFacadeRemote {

    public List<AccountEntity> getAllAccounts();
    
    public List<AccountEntity> getAllAccountsByType(String type);

    public AccountEntity getAccountById(Long id);

    public AccountEntity getAccountByAccountIBAN(String iban);

    public void deposit(String iban, double amount);

    public double getBalance(String iban);

    public boolean withdraw(double amount, String iban);
    
    public AccountEntity addAccount(String iban,int type);
    
    public AccountEntity removeAccount(Long id);
    
    public List<AccountEntity> removeAllAccounts();

    public AccountEntity removeAccountByIBAN(String iban);
    
    /**
    *
    * @author Houssem Z.
    */
    public void persistAccount(AccountEntity account);
    
    /*
     *  add an account
     *  remove an account by isbn
     *  remove all account; admin 
     */
}
